EDM-4157: [SPUR] Add divider before Delete#706
EDM-4157: [SPUR] Add divider before Delete#706bugs-buddy-jira-ai-issue-solver[bot] wants to merge 4 commits into
Conversation
Co-authored-by: Celia Amador Gonzalez <camadorg@redhat.com>
Made-with: Cursor
Made-with: Cursor
dfae9a3 to
057963b
Compare
jkilzi
left a comment
There was a problem hiding this comment.
Clean, comprehensive refactor. The two-tier API is well-designed: the JSX compound component (ActionsDropdownList + Item) handles DropdownList usages, while the buildAllDropdownActions helper handles IAction[] arrays for ActionsColumn table rows. Both produce a consistent separator between regular and danger groups.
The mechanical nature of the change (same pattern applied to ~20 files) reduces per-file risk, and CI passing validates correctness.
Good — ImageExportCards action ordering. Moving delete to the end of the actions list (danger group) is the right UX change.
Note — child.type reference equality. ActionsDropdownList uses child.type === ActionsDropdownListItem to classify children. This is a valid React pattern but can theoretically fail in extreme HMR or module-isolation scenarios. Low production risk, but a brief JSDoc comment on the component explaining the classification convention would help future maintainers.
Nit — bundled label rename. "Remove" → "Delete catalog" in CatalogPage.tsx is a welcome clarity improvement, but it's bundled silently into a PR titled "Add divider before Delete". Worth calling out in the description so translators don't miss it.
Nit — ActionsDropdownListItem renders as a fragment. The isDanger prop is intentionally unused by the component itself (the parent reads it via child.props.isDanger). This is a valid React convention but unusual enough to warrant a comment for maintainers.
Co-authored-by: Celia Amador Gonzalez <camadorg@redhat.com>
Added JSDoc comments addressing both notes: (1) Addressed in b6bb5ca. |
|
Needs re-approval after last commit adding JSDoc comments. |
|
@bugs-buddy-jira-ai-issue-solver Ignore the following comment |
|
@bugs-buddy-jira-ai-issue-solver Ignore the following comment |
|
In comment, @amir-yogev-gh said:
I was unable to produce code changes to address this comment after multiple attempts. |
Resolves EDM-4157
Summary
Add PatternFly dividers before destructive actions in all action dropdown menus across the application.
Fixes EDM-4157
Details
Destructive actions (Delete, Decommission, Remove, Cancel) were listed in dropdown menus without visual separation from non-destructive actions, violating PatternFly conventions and increasing risk of accidental data loss.
This PR adds standard PatternFly dividers before the first destructive action in every action menu:
{ isSeparator: true }inIAction[]arrays, which PatternFly'sActionsColumnnatively renders as a<Divider /><Divider component="li" />inside<DropdownList><Divider component="li" />Dividers are conditionally rendered to avoid showing when the destructive action is the only menu item.
Affected menus
Test plan
tsc --noEmit)